<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" id="viewport" content="width=device-width, initial-scale=1">
    <title>选择页面</title>
<!--    <link rel="stylesheet" href="https://unpkg.com/mint-ui/lib/style.css">-->
<!--    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>-->
<!--    <script src="https://unpkg.com/mint-ui/lib/index.js"></script>-->
<!--    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>-->
<!--    <script src="https://cdn.bootcss.com/qs/6.5.1/qs.min.js"></script>-->
    <link rel="stylesheet" th:href="@{/formlist/common/style.css}">
    <script th:src="@{/formlist/common/vue.js}"></script>
    <script th:src="@{/formlist/common/index.js}"></script>
    <script th:src="@{/formlist/common/axios.min.js}"></script>
    <script th:src="@{/formlist/common/qs.min.js}"></script>
    <link th:href="@{/formlist/css/reset.css}" rel="stylesheet">
    <link th:href="@{/formlist/css/main.css}" rel="stylesheet">
</head>
<body>
<div id="select" class="login">
    <div class="go"><mt-button @click.native="clickOut">医院在外人员填报</mt-button></div>

    <div class="in"><mt-button @click.native="clickIn">医院返宁人员填报</mt-button></div>
    <div class="logout">
        <mt-palette-button
                :content="cont"
                @expand="main_log('expand')"
                @expanded="main_log('expanded')"
                @collapse="main_log('collapse')"
                direction="rt"
                ref="target_1">
            <div class="my-icon-button indexicon icon-popup" @touchstart="sub_log(1)">修改个人信息</div>
            <div class="my-icon-button indexicon icon-popup" @touchstart="sub_log(2)">退出</div>
        </mt-palette-button>
    </div>
<!--    <div class="logout" v-on:click="logout">退出</div>-->
    <div style="position: fixed; right: 24px;bottom: 50px">

    </div>
</div>
<script>
    const vm = new Vue({
        el: '#select',
        data: {
            message: 'hello',
            cont: '展开',
            username: '',
            password: '',
        },
        // created: function () {
        //     console.log(sessionStorage.getItem("userid"))
        // },
        methods: {
            clickOut:function (event) {
                location.href = '/system/tianbao/zaiwailist';
            },
            clickIn:function (event) {
                location.href = '/system/tianbao/fanninglist';
            },
            main_log(val) {
                if (val === 'expand') {
                    this.cont = "收起"
                } else if (val === 'collapse') {
                    this.cont = "展开"
                }
            },
            sub_log(val) {
                // console.log('sub_log', val);
                // this.$refs.target_1.collapse();
                if (val === 1) {
                    location.href = '../formlist/form';
                } else if (val === 2) {
                    axios.post('/system/renyuan/logout').then(res => {
                        if (res.data.code === 0) {
                            location.href = '../formlist/login';
                        }
                    });
                }
            },
            logout:function (event) {
                axios.post('/system/renyuan/logout').then(res => {
                    if (res.data.code === 0) {
                        location.href = '../formlist/login';
                    }
                });
            }
        }

    })
</script>
</body>
</html>